Skip to content

fix(fox): improve ecosystem icon consistency and header spacing - #12516

Merged
kaladinlight merged 8 commits into
shapeshift:developfrom
Masha-lla:codex/fix-fox-ecosystem-layout
Aug 5, 2026
Merged

fix(fox): improve ecosystem icon consistency and header spacing#12516
kaladinlight merged 8 commits into
shapeshift:developfrom
Masha-lla:codex/fix-fox-ecosystem-layout

Conversation

@Masha-lla

@Masha-lla Masha-lla commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

  • replace the FOX farming and governance emoji with consistently sized Tabler icons
  • keep the full global search field for 3xl displays and use the compact search action below that breakpoint
  • prevent the global search control from overlapping the Ecosystem navigation item on wide desktop layouts

Issue (if applicable)

N/A

Risk

Low. These changes are isolated to presentational icons on the FOX ecosystem page and the responsive display breakpoint of the existing global search controls.

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

None. No protocol, transaction, wallet, or contract behavior is changed.

Testing

Engineering

  1. Run pnpm run dev:web:localhost.
  2. Open /#/fox-ecosystem.
  3. Verify the Farming and Governance headings use consistent Tabler icons.
  4. At desktop widths below 2200px, verify the compact search icon is shown and does not overlap the Ecosystem navigation item.
  5. At widths of 2200px and above, verify the full global search field is shown.
  6. Confirm the global search modal opens from both search control variants.

Quality gates completed:

  • pnpm run lint --fix (passes with pre-existing warnings only)
  • pnpm run type-check

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

In a preview environment, open the FOX ecosystem page and verify that the Farming and Governance section icons share a consistent visual style. Resize the browser around the 2200px breakpoint and confirm that the search control never covers the Ecosystem navigation item.

Screenshots (if applicable)

N/A

Summary by CodeRabbit

  • Style
    • Improved header responsiveness by showing the full search box at wider screen sizes while retaining the search icon on smaller screens.
    • Replaced farming and governance emoji headings with consistent, accessible visual icons.
    • Refined the sticky header’s appearance and transition while scrolling.

@Masha-lla
Masha-lla requested a review from a team as a code owner August 3, 2026 20:59
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@kaladinlight, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ebe1350-4ffe-4150-b1ba-003f3e68baef

📥 Commits

Reviewing files that changed from the base of the PR and between 7a4931c and 9d6502b.

📒 Files selected for processing (1)
  • src/components/Layout/Header/Header.tsx
📝 Walkthrough

Walkthrough

The header now uses a 1540px media query for search visibility and a scroll-aware backdrop pseudo-element. Fox farming and governance headings now use Chakra icons instead of emojis.

Changes

UI polish

Layer / File(s) Summary
Header search and scroll styling
src/components/Layout/Header/Header.tsx, src/components/Layout/Header/GlobalSearch/GlobalSearchButton.tsx
The full search box appears at or above 1540px. The icon-only button appears below that width. The sticky header applies scroll styling through _before.
Fox heading icons
src/pages/Fox/components/FoxFarming.tsx, src/pages/Fox/components/FoxGovernance.tsx
The farming heading uses TbPlant2. The governance heading uses TbBuildingBank. Both icons use blue styling and hidden accessibility text.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: 0xapotheosis, kaladinlight

Poem

A rabbit hops through screens so bright,
Finds plants and banks in blue delight.
The search bar shifts at widths new,
While scroll effects change the view.
“Clean headings!” cheers the hare.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the icon consistency and header spacing changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
src/components/Layout/Header/Header.tsx (1)

89-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Memoize the responsive display objects.

searchBoxDisplay and iconButtonDisplay are recreated on every Header render. Wrap them in useMemo with empty dependency arrays, or move them to stable module-level constants.

Proposed fix
-  const searchBoxDisplay = {
-    base: 'none',
-    '3xl': 'flex',
-  }
+  const searchBoxDisplay = useMemo(
+    () => ({
+      base: 'none',
+      '3xl': 'flex',
+    }),
+    [],
+  )

-  const iconButtonDisplay = {
-    base: 'flex',
-    '3xl': 'none',
-  }
+  const iconButtonDisplay = useMemo(
+    () => ({
+      base: 'flex',
+      '3xl': 'none',
+    }),
+    [],
+  )

As per coding guidelines, TSX object and array creations must use useMemo.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Layout/Header/Header.tsx` around lines 89 - 94, Stabilize the
responsive display objects searchBoxDisplay and iconButtonDisplay in Header by
wrapping each in useMemo with empty dependency arrays, or by moving them to
module-level constants. Preserve their existing display mappings and ensure the
chosen approach avoids recreating these objects on every render.

Source: Coding guidelines

src/pages/Fox/components/FoxFarming.tsx (1)

75-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use UPPER_SNAKE_CASE for both module-level icon constants.

  • src/pages/Fox/components/FoxFarming.tsx#L75-L75: rename farmingIcon to FARMING_ICON and update Line 308.
  • src/pages/Fox/components/FoxGovernance.tsx#L56-L56: rename governanceIcon to GOVERNANCE_ICON and update Line 124.

As per coding guidelines, use UPPER_SNAKE_CASE for constants and configuration values.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Fox/components/FoxFarming.tsx` at line 75, Rename the module-level
icon constants to UPPER_SNAKE_CASE: update farmingIcon to FARMING_ICON in
src/pages/Fox/components/FoxFarming.tsx and its usage at line 308, and update
governanceIcon to GOVERNANCE_ICON in src/pages/Fox/components/FoxGovernance.tsx
and its usage at line 124.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/components/Layout/Header/Header.tsx`:
- Around line 89-94: Stabilize the responsive display objects searchBoxDisplay
and iconButtonDisplay in Header by wrapping each in useMemo with empty
dependency arrays, or by moving them to module-level constants. Preserve their
existing display mappings and ensure the chosen approach avoids recreating these
objects on every render.

In `@src/pages/Fox/components/FoxFarming.tsx`:
- Line 75: Rename the module-level icon constants to UPPER_SNAKE_CASE: update
farmingIcon to FARMING_ICON in src/pages/Fox/components/FoxFarming.tsx and its
usage at line 308, and update governanceIcon to GOVERNANCE_ICON in
src/pages/Fox/components/FoxGovernance.tsx and its usage at line 124.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a581fb83-a4bf-42d5-99a1-e440e2ffa081

📥 Commits

Reviewing files that changed from the base of the PR and between 6170b71 and ba0c3ff.

📒 Files selected for processing (3)
  • src/components/Layout/Header/Header.tsx
  • src/pages/Fox/components/FoxFarming.tsx
  • src/pages/Fox/components/FoxGovernance.tsx

Masha and others added 6 commits August 3, 2026 23:36
TbBuildingBank's glyph sits low in its viewBox (y=6-21 of 24), so the
box-centered icon rendered ~2px below the heading text center; nudge it
up to compensate. TbPlant2 is already centered and needs no offset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Hiding the bar until 3xl (2200px) removed it for all 1080p displays.
The bar genuinely fits once each flex=1 side section clears its content
width (~1540px); no theme breakpoint sits near that point, so gate the
full/icon variants on a raw media query and give the bar a static 300px
width instead of min/max clamps whose responsive keys were inert.

Also remove the unreachable sub-lg fallback inside GlobalSearchButton:
the full-bar variant has never rendered below 1440px, so its internal
below-992px icon switch was dead code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The sticky header floats 8px below the viewport top with side gutters,
so scrolling content was visible through the surrounding gap. Add an
always-opaque backdrop pseudo-element (body background color, so it is
invisible at rest) extending past the header on top and sides, with a
full-width bottom hairline that activates instantly on scroll. The
pill's own conditional background, border, radius and transitions are
superseded by the mask and removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kaladinlight

Copy link
Copy Markdown
Member

Pushed three commits onto this branch while testing it locally — summary of what changed and why:

f34b413 — fox icons: renamed the icon constants to camelCase to match the existing pattern (swapIcon/giftIcon in the Yields components), and added a 2px translateY to the governance icon: TbBuildingBank's artwork sits low inside its viewBox (y=6–21 of 24), so box-centering rendered it visibly below the heading text's center. TbPlant2 is centered and needed no adjustment.

2707e3b — search breakpoint: moving the full search bar to 3xl (2200px) fixed the overlap but also removed the bar for all 1920px/1080p displays, which previously had it at 2xl. The bar genuinely fits once each flex='1' side section clears its content width — around 1540px — and no theme breakpoint sits near that point, so the full/icon switch now uses a raw @media (min-width: 1540px) query via sx, with a static 300px width (the old min/max clamps' responsive keys were all inert). Also removed the unreachable sub-lg fallback inside GlobalSearchButton — the full-bar variant has never rendered below 1440px.

4c589ea — header scroll gap: while testing we noticed page content showing through the 8px gap above/beside the floating header when scrolling (most visible on content-dense pages like fox-ecosystem). Added an always-opaque backdrop pseudo-element in the body background color (invisible at rest, zero-lag since no JS is involved) with a full-width bottom hairline that activates on scroll. This supersedes the pill's conditional background/border, which are removed.

Tested across the 1540px boundary, at 1920, and 2560, plus fast-scroll on the fox-ecosystem page.

@kaladinlight
kaladinlight enabled auto-merge (squash) August 5, 2026 16:50
@kaladinlight
kaladinlight disabled auto-merge August 5, 2026 16:50
@kaladinlight
kaladinlight enabled auto-merge (squash) August 5, 2026 16:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/components/Layout/Header/Header.tsx (1)

56-58: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Apply the constant naming and explicit-type rules.

fullSearchMediaQuery, searchBoxSx, and iconButtonSx are module-level configuration values. Rename them to FULL_SEARCH_MEDIA_QUERY, SEARCH_BOX_SX, and ICON_BUTTON_SX. Add explicit types for the new style objects, including backdropSx. Verify the selected Chakra style type against @chakra-ui/react@2.10.7.

As per coding guidelines, use UPPER_SNAKE_CASE for constants and configuration values and explicit types for TypeScript object shapes.

Also applies to: 96-109

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Layout/Header/Header.tsx` around lines 56 - 58, Rename the
module-level configuration values fullSearchMediaQuery, searchBoxSx, and
iconButtonSx to FULL_SEARCH_MEDIA_QUERY, SEARCH_BOX_SX, and ICON_BUTTON_SX,
updating all references including the indicated later usage. Add explicit
Chakra-compatible style types to SEARCH_BOX_SX, ICON_BUTTON_SX, and backdropSx,
verifying the type against `@chakra-ui/react` 2.10.7.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/Layout/Header/Header.tsx`:
- Around line 92-96: Update the header scroll-threshold logic around isScrolled
and height so height is measured after the header ref mounts and refreshed when
the header size or viewport changes, rather than memoized from an initial null
ref. Keep isScrolled comparing the current scroll position against the measured
header height.

---

Nitpick comments:
In `@src/components/Layout/Header/Header.tsx`:
- Around line 56-58: Rename the module-level configuration values
fullSearchMediaQuery, searchBoxSx, and iconButtonSx to FULL_SEARCH_MEDIA_QUERY,
SEARCH_BOX_SX, and ICON_BUTTON_SX, updating all references including the
indicated later usage. Add explicit Chakra-compatible style types to
SEARCH_BOX_SX, ICON_BUTTON_SX, and backdropSx, verifying the type against
`@chakra-ui/react` 2.10.7.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b7d31602-b5a4-43d3-8d28-baa8a1506d08

📥 Commits

Reviewing files that changed from the base of the PR and between ba0c3ff and 7a4931c.

📒 Files selected for processing (3)
  • src/components/Layout/Header/GlobalSearch/GlobalSearchButton.tsx
  • src/components/Layout/Header/Header.tsx
  • src/pages/Fox/components/FoxGovernance.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/Fox/components/FoxGovernance.tsx

Comment thread src/components/Layout/Header/Header.tsx Outdated
The height was memoized from a null ref during the initial render, so it
was always 0 and the threshold was already effectively any-scroll. Make
that explicit and remove the dead ref plumbing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kaladinlight

Copy link
Copy Markdown
Member

@coderabbitai The naming/typing nitpick is skipped intentionally: this file's existing module-level constants (displayProp2, paddingTopProp, leftHStackSpacingSx, baseTradeSubMenuItems) are all camelCase untyped objects, as is the repo-wide pattern for hoisted style constants (e.g. the Yields components). fullSearchMediaQuery/searchBoxSx/iconButtonSx follow the local convention — switching them to UPPER_SNAKE_CASE would make them the only such constants in the codebase.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@kaladinlight Acknowledged. fullSearchMediaQuery, searchBoxSx, and iconButtonSx follow the existing local convention for hoisted style constants. The naming and typing nitpick does not apply.


✏️ Learnings added
Learnt from: kaladinlight
URL: https://github.com/shapeshift/web/pull/12516

Timestamp: 2026-08-05T17:05:51.742Z
Learning: In `src/components/Layout/Header/Header.tsx`, module-level style and responsive-query constants use camelCase untyped objects. Examples include `displayProp2`, `paddingTopProp`, `leftHStackSpacingSx`, and `baseTradeSubMenuItems`. Review new hoisted style constants such as `fullSearchMediaQuery`, `searchBoxSx`, and `iconButtonSx` against this local convention; do not require UPPER_SNAKE_CASE or explicit object typing solely for these constants.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

@kaladinlight
kaladinlight merged commit 43dc0f9 into shapeshift:develop Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants